package com.anycl.design.structural.proxy.staticproxy;

/**
 * 静态代理
 * 在不改变原有类代码的情况下实现功能增强
 */
public class Main {

    public static void main(String[] args) {
        String name = "anycl";

        IBuyer buyer = new Buyer(name);
/*        buyer.login(name, "123456");
        buyer.buyTicket();*/
        IBuyer proxyBuyer = new BuyerProxy(buyer);
        proxyBuyer.login(name, "123456");
        proxyBuyer.buyTicket();
    }
}
